<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>消息</title>
	<link rel="stylesheet" href="css/amazeui.min.css" />
	<link rel="stylesheet" href="css/app.css" />
	<link rel="stylesheet" href="css/swiper-3.3.1.min.css" />
	<script src="js/amazeui.min.js" type="text/javascript"></script>
	<script src="js/jquery.min.js" type="text/javascript"></script>
	<style>
		body {
			max-width: 640px;
			margin: 0 auto;
			font-size: 10px;
			background: #F2F3F8;
		}

		* {
			box-sizing: border-box;
		}

		[class*=am-u-] {
			padding: 0;
		}
	</style>
</head>

<body>
	<!--头部-->
	<header class="am-u">
		<div class="am-u-sm-12 head_nav" style="margin:0;">
			<div class="am-u-sm-2 am-vertical-align" style="text-align: center;">
				<a href="home.html">
					<img src="img/return@2x.png" class="am-vertical-align-middle" alt="" />
				</a>
			</div>
			<div class="am-u-sm-8 head_text">
				消息
			</div>
			<div class="am-u-sm-2" style="color: #fff;font-size: 13px;text-align: center;">

			</div>
		</div>
	</header>
	<div style="clear: both;"></div>
	<div class="am-u" id='lx_list'>

	</div>
	<script src="js/jquery-1.11.3.js"></script>
	<script src="js/loading.js"></script>
	<script>
		var token1 = sessionStorage.getItem("token");
		$.ajax({
			type: 'POST',
			url: "http://www.rice.com/app/api/h5_access",
			contentType: "application/x-www-form-urlencoded; charset=utf-8",
			datatype: "JSON",
			data: {
				method: "get_msg_type_list",
				token: token1
			},
			success: function (data) {
				var data1 = JSON.parse(data);
				console.log(data1);
				if (data1.status === 1) {
					var html = "";
					for (var i in data1.data.list) {
						html +=
							'<div class="am-u-sm-12" style="border-bottom: 1px solid #BCBEBD;padding: 10px;"><div class="am-u-sm-2" style="text-align: center;"><img src="img/logo.png" width="30" alt="" /></div><div class="am-u-sm-10">';
						html += '<a href="alerts.html?mid=' + data1.data.list[i].mid +
							'" style="color:#fff;font-size: 16px;color: #424242;padding-left:10px; padding-top: 3px;display: block;">' +
							data1.data.list[i].type_name + '</a></div></div>';
					}
					$("#lx_list").html(html);
				} else if (Number(data1.status) == 2) {
					alert(data1.message);
					window.location.href = "login.html";
				} else {
					alert(data1.message);
				}
			}
		});
	</script>
</body>

</html>